Repository navigation
fix(api): reject posts to archived channels - #326
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Draft PR ready for workflow approval. The change is small: an archived-channel guard in both the postgres and sqlite stores, a 409 mapping, a postgres store test, and an HTTP regression test. The CI runs are |
|
Codex review: needs real behavior proof before merge. What this changesThis PR rejects archived-channel writes in both database stores and returns HTTP 409. Example: A member posts {"body":"archived"} to a channel after archived=true.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 4 items remain Keep open: current main does not implement this change, and making archived channels read-only needs an owner decision before merge. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherAuthenticated HTTP requests enter the shared store posting checks; SQLite or PostgreSQL then persists messages and events, which the HTTP layer publishes to connected clients. flowchart TD
Client --> HTTP
HTTP --> PostingChecks
PostingChecks --> SQLite
PostingChecks --> PostgreSQL
SQLite --> Events
PostgreSQL --> Events
Events --> Subscribers
Technical reviewBest possible solution: Agree on archive write semantics, then implement that scope in the existing shared owner with clear recovery guidance and preserved restoration. Do we have a high-confidence way to reproduce the issue? Both current-main stores visibly permit archived-channel posting, but no runtime reproduction was run and the expected read-only contract remains unsettled. Is this the best way to solve the issue? The existing shared posting owner is a small implementation point, but its wider callers require an explicit scope decision. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 03e85d6c704a. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 12:09 AM ET / 05:09 UTC. |
|
Archive contract proposal for the owner decision: archive makes the channel read-only. Block new messages, thread replies, topic creation, slash-command writes, and ephemeral events. Keep read access, history, restore behavior, and the sidebar hiding unchanged. Unarchive restores writes. This matches the existing archive intent (hide from the sidebar, retain access and history) while stopping new traffic. If maintainers prefer archive to remain writable, I will close this PR and adjust #325. The P3 recovery note is addressed: the error now says "channel is archived; choose an active channel or ask a workspace owner to restore it." Real behavior proof: the CI workflows are |
|
Marked ready for review. Two asks:
The patch is small and has store + HTTP tests ready. |
steipete
left a comment
There was a problem hiding this comment.
Verified the archived-channel regression, reply and restoration coverage in both stores, the patched Go build, and clean independent P0–P2 review. All required checks are green at the current head.
Archived channels previously accepted new posts because the shared store posting check never inspected archived_at. Reject new posts, thread replies, and other posting activity with HTTP 409 in both SQLite and PostgreSQL, while retaining existing membership checks and historical access. Restoring with archived:false retains the channel ID and links.
The maintenance validation also exposed reachable GO-2026-6859 in Go 1.27.3. Build with Go 1.27.4 and matching pinned container images, retaining the documented Go 1.26.6 module minimum.
Validation: the HTTP regression fails on main with 201 instead of 409. The full pnpm check passes, including SQLite/store and HTTP tests; added PostgreSQL coverage runs in CI. Focused archive/reply/restore tests and govulncheck pass with Go 1.27.4 (zero reachable vulnerabilities). Independent Codex P0–P2 review is clean. No release or deployment is part of this PR.
Fixes #325.